<template>
  <div class="home">
    <van-button type="primary">主要按钮</van-button>
    <van-button type="info">信息按钮</van-button>
    <van-button type="default">默认按钮</van-button>
    <van-button type="warning">警告按钮</van-button>
    <van-button type="danger">危险按钮</van-button>
	<van-search v-model="value" placeholder="请输入搜索关键词" />
	 <van-search
	    v-model="value"
	    show-action
	    placeholder="请输入搜索关键词"
	    @search="onSearch"
	    @cancel="onCancel"
	  />
	  <!-- 轮播图 -->
	  <van-swipe :autoplay="2000">
	    <van-swipe-item v-for="(image, index) in images" :key="index">
	      <img width="100" v-lazy="image" />
	    </van-swipe-item>
	  </van-swipe>
  </div>
</template>

<script>

export default {
  name: 'HomeView',
  data(){
	  return{
		  value:'',
		  images: [
			  'https://img01.yzcdn.cn/vant/apple-1.jpg',
			  'https://img01.yzcdn.cn/vant/apple-2.jpg',
			
		  ],
		  active:0
	  }
  },
  methods:{
	  onSearch(val){
		  console.log(val);
	  },
	  onCancel(){
		  console.log("用户取消搜索了");
	  }
  }
  
}
</script>
